home *** CD-ROM | disk | FTP | other *** search
/ Computer Life 1997 February / Computer Life February 1997.iso / TELME / COMMS / ISDN1000.SRP < prev    next >
Text File  |  1996-06-04  |  3KB  |  170 lines

  1. rem Copyright (c) PhoneLink plc 
  2. rem PSL - ISDN (23/8/95)
  3. rem Updated 11 october 1995
  4. rem Added &w at end of init string.
  5. rem updated 13th December 1995 - DTR toggle
  6.  
  7. label InitDevice
  8. echo off
  9. flush
  10. echo script[59]
  11. send    "ate0&k2s39=4s112=0&d2char(13)" 
  12. timeout 5,modem_offline
  13. find    "OK"
  14. send    "atochar(13)"
  15. timeout 5,pad_fail
  16. find    "*"
  17. send    "set 1:1,2:0,3:0,4:20,5:1,6:5,12:1,15:0char(13)" 
  18. timeout 5,pad_set_fail
  19. find    "*"
  20. send    "char(16)"
  21. timeout 5,data_mode_fail
  22. find    "OK"
  23. send    "at&wchar(13)"
  24. timeout 5,data_mode_fail
  25. find    "OK"
  26.  
  27. label OffToGate 
  28. rem ISDN Offline to Gate (also contains Pad to Gate)
  29. echo off
  30. flush
  31. echo script[52].
  32. send    "atdt{PreTel}{SiteTel}{PostFix}char(13)"
  33. timeout 10,connect_fail
  34. finderr 0,BUSY,busy
  35. finderr 103,NO DIALTONE,connect_fail
  36. finderr 0,NO CARRIER,no_carrier
  37. find    "*"
  38.  
  39. label PadToGate
  40. echo script[53]
  41. echo off
  42. send    "{NUA}char(13)"
  43. timeout 3,nua_fail
  44. finderr 0,CLR DTE,dte_cleared
  45. finderr 0,CLR DER,der_cleared
  46. finderr 0,RESET,reset
  47. finderr 0,CLR OCC,occ_cleared
  48. finderr 0,COM,nua_good
  49. find    "ZZZ"
  50. label nua_good
  51. echo script[54].
  52. end
  53.  
  54. label GateToPad
  55. echo off
  56. echo script[92]
  57. send    "char(16)"
  58. timeout 5,ctrl_p_fail
  59. find    "*"
  60. send "CLRchar(13)"
  61. timeout 5,clear_fail
  62. find "CLR CONF"
  63. echo script[91]..
  64. end
  65.  
  66. label GateToOff
  67. rem Gate to Offline (also contains Pad to Offline)
  68. echo off
  69. echo script[92]
  70. send    "char(16)"
  71. timeout 5,ctrl_p_fail
  72. find    "*"
  73. send "CLRchar(13)"
  74. timeout 10,clear_fail
  75. find "CLR CONF"
  76.  
  77. label PadToOff
  78. echo off 
  79. echo script[92]
  80. send    "char(16)"
  81. timeout 5,command_mode_fail
  82. find    "OK"
  83. send    "athchar(13)"
  84. timeout 5,hang_up_fail
  85. find    "OK"
  86. echo script[99].
  87. end
  88.  
  89. label modem_offline
  90. rem This is the doomsday scenario. Use DTR toggle to drop call
  91. dtrlow
  92. mwait 500
  93. dtrhigh
  94. abort
  95.  
  96. label pad_fail
  97. echo script[4]
  98. goto modem_offline
  99. abort
  100.  
  101. label pad_set_fail
  102. echo script[5]
  103. goto modem_offline
  104. abort
  105.  
  106. label data_mode_fail
  107. echo script[16]
  108. goto modem_offline
  109. abort
  110.  
  111. label connect_fail
  112. echo script[1]
  113. goto modem_offline
  114. abort
  115.  
  116. label busy
  117. echo script[2]
  118. goto modem_offline
  119. abort
  120.  
  121. label no_carrier
  122. echo script[3]
  123. goto modem_offline
  124. abort
  125.  
  126. label nua_fail
  127. echo script[22]
  128. goto modem_offline
  129. abort
  130.  
  131. label dte_cleared
  132. echo script[6]
  133. goto modem_offline
  134. abort
  135.  
  136. label der_cleared
  137. echo script[7]
  138. goto modem_offline
  139. abort
  140.  
  141. label reset
  142. echo script[8]
  143. goto modem_offline
  144. abort
  145.  
  146. label occ_cleared
  147. echo script[9]
  148. goto modem_offline
  149. abort
  150.  
  151. label ctrl_p_fail
  152. echo script[12]
  153. goto modem_offline
  154. abort
  155.  
  156. label clear_fail
  157. echo script[13]
  158. goto modem_offline
  159. abort
  160.  
  161. label command_mode_fail
  162. echo script[15]
  163. goto modem_offline
  164. abort
  165.  
  166. label hang_up_fail
  167. echo script[17]
  168. goto modem_offline
  169. abort
  170.